import express from 'express'
import attributeController from '@/controllers/attributeController'

const router = express.Router()

/**
 * 查询指定分类下的属性列表
 * GET /attributes
 */
router.get('/', attributeController.getAttributes)

/**
 * 查询属性详情
 * GET /attributes/:id
 */
router.get('/:id', attributeController.getAttributeInfo)

/**
 * 添加属性及属性值
 * POST /attributes
 */
router.post('/', attributeController.addAttributeAndValues)

export default router
